package cn.luischen.model;

import org.powermock.reflect.Whitebox;
import org.mockito.Mock;
import static org.junit.Assert.fail;
import org.junit.runner.RunWith;
import java.util.HashMap;
import java.util.ArrayList;
import org.mockito.MockitoAnnotations;
import com.alibaba.fastjson.JSONArray;
import org.junit.After;
import org.powermock.core.classloader.annotations.PrepareForTest;
import java.util.Map;
import static org.junit.Assert.assertEquals;
import org.powermock.modules.junit4.PowerMockRunner;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PowerMockIgnore;
import java.lang.reflect.Method;
import org.junit.rules.ExpectedException;
import org.mockito.InjectMocks;
import org.junit.Test;
import static org.junit.Assert.*;
import com.unitspirit.runtime.*;
import org.mockito.Mockito;
import java.util.List;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
import org.junit.Rule;
import static org.junit.Assert.assertNotNull;
import static org.mockito.ArgumentMatchers.*;
import static org.mockito.Mockito.*;
import static org.junit.Assert.assertTrue;
import com.alibaba.fastjson.parser.ParserConfig;

/**
* The class <code>UserDomainTest</code> contains tests for the class <code>{@link UserDomain}</code>.
* Copyright (c) 2020
* 
* @generatedBy UnitSpirit at 2021-09-07 17:51:57
* @version 1.0.20210903
*/

@PowerMockIgnore({ "javax.management.*" })
public class UserDomain_getUsername_WGTest {

	@Rule
	public ExpectedException unitspirit_thrown = ExpectedException.none();

	/**
	* 测试方法初始化.
	* 
	* @throws Exception 
	*         if the initialization fails for some reason 
	*  
	* @generatedBy UnitSpirit at 2021-09-07 17:51:57
	*/
	@org.junit.Before
	public void setUp() throws Exception {
		try {
			ParserConfig.getGlobalInstance().setAutoTypeSupport(true);
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

	/**
	* @date 2021-09-07 17:51:58
	* @see cn.luischen.model.UserDomain#getUsername
	* @category auto generate by UnitSpirit  
	* @author UnitSpirit   
	*/
	@Test
	public void test_getUsername_0113_190016_934_0_00() throws Throwable {

		cn.luischen.model.UserDomain unitspirit_fixture = new cn.luischen.model.UserDomain();
		//成员变量设置
		Whitebox.setInternalState(unitspirit_fixture, "uid", 1);
		Whitebox.setInternalState(unitspirit_fixture, "groupName", "visitor");
		Whitebox.setInternalState(unitspirit_fixture, "password", "a66abb5684c45962d887564f08346e8d");
		Whitebox.setInternalState(unitspirit_fixture, "logged", 0);
		Whitebox.setInternalState(unitspirit_fixture, "created", 1490756162);
		Whitebox.setInternalState(unitspirit_fixture, "screenName", "admin1");
		Whitebox.setInternalState(unitspirit_fixture, "email", "1034683568@qq.com");
		Whitebox.setInternalState(unitspirit_fixture, "activated", 0);
		Whitebox.setInternalState(unitspirit_fixture, "username", "admin");

		//返回值定义 
		String result_expected = "\"admin\"";

		String unitspirit_result_d = "\"admin\"";
		unitspirit_fixture.setUsername(unitspirit_result_d);
		String unitspirit_result = unitspirit_fixture.getUsername();
		//getCaseAssertList 
		UnitAssert.assertEquals(result_expected, unitspirit_result);
	}

	/**
	* @date 2021-09-07 17:51:58
	* @see cn.luischen.model.UserDomain#getUsername
	* @category auto generate by UnitSpirit  
	* @author UnitSpirit   
	*/
	@Test
	public void test_getUsername_0113_190031_954_1_00() throws Throwable {

		cn.luischen.model.UserDomain unitspirit_fixture = new cn.luischen.model.UserDomain();
		//成员变量设置
		Whitebox.setInternalState(unitspirit_fixture, "uid", 1);
		Whitebox.setInternalState(unitspirit_fixture, "groupName", "visitor");
		Whitebox.setInternalState(unitspirit_fixture, "password", "a66abb5684c45962d887564f08346e8d");
		Whitebox.setInternalState(unitspirit_fixture, "logged", 0);
		Whitebox.setInternalState(unitspirit_fixture, "created", 1490756162);
		Whitebox.setInternalState(unitspirit_fixture, "screenName", "admin12");
		Whitebox.setInternalState(unitspirit_fixture, "email", "1034683568@qq.com");
		Whitebox.setInternalState(unitspirit_fixture, "activated", 0);
		Whitebox.setInternalState(unitspirit_fixture, "username", "admin");

		//返回值定义 
		String result_expected = "\"admin\"";

		String unitspirit_result_d = "\"admin\"";
		unitspirit_fixture.setUsername(unitspirit_result_d);
		String unitspirit_result = unitspirit_fixture.getUsername();
		//getCaseAssertList 
		UnitAssert.assertEquals(result_expected, unitspirit_result);
	}

	/**
	* @date 2021-09-07 17:51:58
	* @see cn.luischen.model.UserDomain#getUsername
	* @category auto generate by UnitSpirit  
	* @author UnitSpirit   
	*/
	@Test
	public void test_getUsername_0113_190031_954_9_00() throws Throwable {

		cn.luischen.model.UserDomain unitspirit_fixture = new cn.luischen.model.UserDomain();
		//成员变量设置
		Whitebox.setInternalState(unitspirit_fixture, "uid", 1);
		Whitebox.setInternalState(unitspirit_fixture, "groupName", "visitor");
		Whitebox.setInternalState(unitspirit_fixture, "password", "a66abb5684c45962d887564f08346e8d");
		Whitebox.setInternalState(unitspirit_fixture, "logged", 0);
		Whitebox.setInternalState(unitspirit_fixture, "created", 1490756162);
		Whitebox.setInternalState(unitspirit_fixture, "screenName", "admin12");
		Whitebox.setInternalState(unitspirit_fixture, "email", "1034683568@qq.com");
		Whitebox.setInternalState(unitspirit_fixture, "activated", 0);
		Whitebox.setInternalState(unitspirit_fixture, "username", "admin");

		//返回值定义 
		String result_expected = "\"admin\"";

		String unitspirit_result_d = "\"admin\"";
		unitspirit_fixture.setUsername(unitspirit_result_d);
		String unitspirit_result = unitspirit_fixture.getUsername();
		//getCaseAssertList 
		UnitAssert.assertEquals(result_expected, unitspirit_result);
	}
}
